﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000DD RID: 221
	[Serializable]
	public class AntialiasingModel : PostProcessingModel
	{
		// Token: 0x170000BC RID: 188
		// (get) Token: 0x060004B7 RID: 1207 RVA: 0x00026F26 File Offset: 0x00025126
		// (set) Token: 0x060004B8 RID: 1208 RVA: 0x00026F2E File Offset: 0x0002512E
		public AntialiasingModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x060004B9 RID: 1209 RVA: 0x00026F37 File Offset: 0x00025137
		public override void Reset()
		{
			this.m_Settings = AntialiasingModel.Settings.defaultSettings;
		}

		// Token: 0x0400066E RID: 1646
		[SerializeField]
		private AntialiasingModel.Settings m_Settings = AntialiasingModel.Settings.defaultSettings;

		// Token: 0x020000DE RID: 222
		public enum Method
		{
			// Token: 0x04000670 RID: 1648
			Fxaa,
			// Token: 0x04000671 RID: 1649
			Taa
		}

		// Token: 0x020000DF RID: 223
		public enum FxaaPreset
		{
			// Token: 0x04000673 RID: 1651
			ExtremePerformance,
			// Token: 0x04000674 RID: 1652
			Performance,
			// Token: 0x04000675 RID: 1653
			Default,
			// Token: 0x04000676 RID: 1654
			Quality,
			// Token: 0x04000677 RID: 1655
			ExtremeQuality
		}

		// Token: 0x020000E0 RID: 224
		[Serializable]
		public struct FxaaQualitySettings
		{
			// Token: 0x04000678 RID: 1656
			[Tooltip("The amount of desired sub-pixel aliasing removal. Effects the sharpeness of the output.")]
			[Range(0f, 1f)]
			public float subpixelAliasingRemovalAmount;

			// Token: 0x04000679 RID: 1657
			[Range(0.063f, 0.333f)]
			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
			public float edgeDetectionThreshold;

			// Token: 0x0400067A RID: 1658
			[Range(0f, 0.0833f)]
			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
			public float minimumRequiredLuminance;

			// Token: 0x0400067B RID: 1659
			public static AntialiasingModel.FxaaQualitySettings[] presets = new AntialiasingModel.FxaaQualitySettings[]
			{
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0f,
					edgeDetectionThreshold = 0.333f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0.25f,
					edgeDetectionThreshold = 0.25f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 0.75f,
					edgeDetectionThreshold = 0.166f,
					minimumRequiredLuminance = 0.0833f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 1f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.0625f
				},
				new AntialiasingModel.FxaaQualitySettings
				{
					subpixelAliasingRemovalAmount = 1f,
					edgeDetectionThreshold = 0.063f,
					minimumRequiredLuminance = 0.0312f
				}
			};
		}

		// Token: 0x020000E1 RID: 225
		[Serializable]
		public struct FxaaConsoleSettings
		{
			// Token: 0x0400067C RID: 1660
			[Range(0.33f, 0.5f)]
			[Tooltip("The amount of spread applied to the sampling coordinates while sampling for subpixel information.")]
			public float subpixelSpreadAmount;

			// Token: 0x0400067D RID: 1661
			[Tooltip("This value dictates how sharp the edges in the image are kept; a higher value implies sharper edges.")]
			[Range(2f, 8f)]
			public float edgeSharpnessAmount;

			// Token: 0x0400067E RID: 1662
			[Range(0.125f, 0.25f)]
			[Tooltip("The minimum amount of local contrast required to qualify a region as containing an edge.")]
			public float edgeDetectionThreshold;

			// Token: 0x0400067F RID: 1663
			[Tooltip("Local contrast adaptation value to disallow the algorithm from executing on the darker regions.")]
			[Range(0.04f, 0.06f)]
			public float minimumRequiredLuminance;

			// Token: 0x04000680 RID: 1664
			public static AntialiasingModel.FxaaConsoleSettings[] presets = new AntialiasingModel.FxaaConsoleSettings[]
			{
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.33f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.25f,
					minimumRequiredLuminance = 0.06f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.33f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.06f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 8f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.05f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 4f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.04f
				},
				new AntialiasingModel.FxaaConsoleSettings
				{
					subpixelSpreadAmount = 0.5f,
					edgeSharpnessAmount = 2f,
					edgeDetectionThreshold = 0.125f,
					minimumRequiredLuminance = 0.04f
				}
			};
		}

		// Token: 0x020000E2 RID: 226
		[Serializable]
		public struct FxaaSettings
		{
			// Token: 0x170000BD RID: 189
			// (get) Token: 0x060004BC RID: 1212 RVA: 0x000271F0 File Offset: 0x000253F0
			public static AntialiasingModel.FxaaSettings defaultSettings
			{
				get
				{
					return new AntialiasingModel.FxaaSettings
					{
						preset = AntialiasingModel.FxaaPreset.Default
					};
				}
			}

			// Token: 0x04000681 RID: 1665
			public AntialiasingModel.FxaaPreset preset;
		}

		// Token: 0x020000E3 RID: 227
		[Serializable]
		public struct TaaSettings
		{
			// Token: 0x170000BE RID: 190
			// (get) Token: 0x060004BD RID: 1213 RVA: 0x00027210 File Offset: 0x00025410
			public static AntialiasingModel.TaaSettings defaultSettings
			{
				get
				{
					return new AntialiasingModel.TaaSettings
					{
						jitterSpread = 0.75f,
						sharpen = 0.3f,
						stationaryBlending = 0.95f,
						motionBlending = 0.85f
					};
				}
			}

			// Token: 0x04000682 RID: 1666
			[Tooltip("The diameter (in texels) inside which jitter samples are spread. Smaller values result in crisper but more aliased output, while larger values result in more stable but blurrier output.")]
			[Range(0.1f, 1f)]
			public float jitterSpread;

			// Token: 0x04000683 RID: 1667
			[Range(0f, 3f)]
			[Tooltip("Controls the amount of sharpening applied to the color buffer.")]
			public float sharpen;

			// Token: 0x04000684 RID: 1668
			[Range(0f, 0.99f)]
			[Tooltip("The blend coefficient for a stationary fragment. Controls the percentage of history sample blended into the final color.")]
			public float stationaryBlending;

			// Token: 0x04000685 RID: 1669
			[Range(0f, 0.99f)]
			[Tooltip("The blend coefficient for a fragment with significant motion. Controls the percentage of history sample blended into the final color.")]
			public float motionBlending;
		}

		// Token: 0x020000E4 RID: 228
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000BF RID: 191
			// (get) Token: 0x060004BE RID: 1214 RVA: 0x00027258 File Offset: 0x00025458
			public static AntialiasingModel.Settings defaultSettings
			{
				get
				{
					return new AntialiasingModel.Settings
					{
						method = AntialiasingModel.Method.Fxaa,
						fxaaSettings = AntialiasingModel.FxaaSettings.defaultSettings,
						taaSettings = AntialiasingModel.TaaSettings.defaultSettings
					};
				}
			}

			// Token: 0x04000686 RID: 1670
			public AntialiasingModel.Method method;

			// Token: 0x04000687 RID: 1671
			public AntialiasingModel.FxaaSettings fxaaSettings;

			// Token: 0x04000688 RID: 1672
			public AntialiasingModel.TaaSettings taaSettings;
		}
	}
}
